<template>
    <div v-if="path == '/' ? true : false">2</div>
    <router-view></router-view>
</template>

<script setup>
import { ref, onMounted, watch } from 'vue';
import { useRoute } from 'vue-router';

const route = useRoute();
const path = ref(route.fullPath);
const isShow = ref(false);



onMounted(() => {
    watch(route, () => {
        path.value = route.fullPath;
        if (path.value === '/') {
            isShow.value = true;
        } else {
            isShow.value = false;
        }
    });
});

</script>

<style lang="less" scoped></style>